package com.supervision.manage.controller.user

import com.fly.base.common.DataResponse
import com.supervision.domain.bean.po.UserSearchPO
import com.supervision.manage.service.UserService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("manage/1/user")
@Api(tags = ["用户管理"])
class UserController {

    @Autowired
    lateinit var userService: UserService

    @RequestMapping("list", method = [(RequestMethod.GET)])
    @ApiOperation("用户列表")
    fun userList(po: UserSearchPO): DataResponse {
        val data = userService.getUserList(po)
        return DataResponse.create().putAll(data)
    }
}